import * as React from 'react';
import './Card.scss';
interface Props extends React.Props<any> {
  title?: any
  children: any
}
export class Card extends React.PureComponent<Props, any> {
  public static defaultProps: Props = {
    title: {},
    children: {}
  }
  render() {
    const { title, children } = this.props;
    const titleKey = Object.keys(title);
    return (
      <div className='card'>
        {titleKey.length ? <div className='content-title'>{title}</div> : null}
        <div className='new-car'>
          {children}
        </div>
      </div>
    )
  }
}